// main.js
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { createRouter, createWebHistory } from 'vue-router'
import App from './App.vue'
import ElementPlus from 'element-plus' // 完整导入
import 'element-plus/dist/index.css'
import router from './router' // 引入路由配置
import pinia from './stores/index' // 引入 Pinia 实例

// 引入主题样式
import '../src/styles/theme.css' // 确保路径正确
//静态创建路由表
// const router = createRouter({
//   history: createWebHistory(),
//   routes: [
//     { path: '/login', component: () => import('@/views/LoginView.vue') },
//     { path: '/register', component: () => import('@/views/RegisterView.vue') },
//     { path: '/', component: () => import('@/views/HomePage.vue') } ,// 补充主页路由规则
//     {path:'/OrderManagement', component:()=>import('@/views/OrderManagement.vue')},
//     {path:'/AdminLayout',component:()=>import('@/views/AdminLayout.vue')},
//     {path:'/helpCenter',component:()=>import('@/views/HelpCenter.vue')},
//      {path:'/support',component:()=>import('@/views/Support.vue')}
//   ]
// })

const app = createApp(App)
// const pinia = createPinia()
app.use(ElementPlus) // 全局注册所有组件
app.use(createPinia())
// app.use(store)
app.use(router)
// app.use(pinia)
app.mount('#app')
